package cn.edu.sjtu.se.role;

import cn.edu.sjtu.se.Config;
import cn.edu.sjtu.se.metric.Collector;
import cn.edu.sjtu.se.randomfile.RandomFile;

public class Porter extends FtpTask {

	public Porter(Collector collector, Config config)
			throws InterruptedException {
		super(collector, config);
	}

	@Override
	public void run() {

		connect();
		login();

		pwd();
		list();

		RandomFile rf = new RandomFile(2048);
		store(rf);
		retrieve(rf);
		delete(rf);

		quit();
		collector.success();
	}
}
